package cn.tedu.zhyl.base.exception;

import cn.tedu.zhyl.base.response.StatusCode;
import lombok.Data;
import lombok.Getter;

@Data
public class ServiceException extends RuntimeException{
    private Integer code;
    private String msg;

    public ServiceException(StatusCode statusCode){
        code = statusCode.getCode();
        msg = statusCode.getMsg();
    }
    public ServiceException(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }
}
